<?php
/**
 * 生成二维码的请求
 *
 * Author: Zeon
 * Date: 2017/11/24
 * Created by Panxsoft.
 */
namespace App\Http\Requests\OpenWechat\Authorizer;

use App\Exceptions\ApiErrCode;
use App\Http\Requests\ApiRequest;
use App\Models\OpenWechat\Authorizer;

/**
 * Class QrCodeRequest
 *
 * @property string|int scene_value - 二维码 event_key
 * @property int|null expire_seconds - 二维码过期时间
 * @property string forever - 如果有值则生成永久二维码
 *
 * @package App\Http\Requests\OpenWechat\Authorizer
 */
class QrCodeRequest extends AuthorizerAppidRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'expire_seconds' => 'numeric',
            'scene_value'    => 'required|string',
            'forever'        => 'string',
        ];
    }

//    public function messages()
//    {
//        return [
//            'scene_value.*' => '场景值必填',
//        ];
//    }

}
